const cache = require("../util/cache");
const child_process = require("child_process");
const workerExec = __dirname + "/start-worker.js";

const startModule = (args) => {
    port = args[1] || cache.config.port;

    const worker = child_process.fork(workerExec);

    worker.send({
        type: "job",
        data: {
            port
        }
    })
};
module.exports = startModule;